<%= form_tag build_widget_url(:update_password), :remote => true, :id => 'password_form', :role => 'form' do %>
    <div class="form-group">
      <label for="old_password">Old Password</label>
      <%= password_field_tag :old_password, '', :class => 'form-control', :required => true %>
    </div>
    <div class="form-group">
      <label for="new_password">New Password</label>
      <%= password_field_tag :new_password, '', :class => 'form-control', :required => true %>
      <span>Password must be between 8 and 20 characters with no spaces</span>
    </div>
    <div class="form-group">
      <label for="password_confirmation">Confirm Password</label>
      <%= password_field_tag :password_confirmation, '', :class => 'form-control', :required => true %>
    </div>

    <%= submit_tag "Submit", :disable_with => "Please wait...", :class => "btn btn-lg btn-primary btn-block" %>
<% end %>

<script type="text/javascript">
    jQuery('#password_form').bind('ajax:success', function (e, response) {
        jQuery('#password_form')[0].reset();
    });
</script>